#pragma once

#include "math.h"
#include "graphics.h"

class IStackAllocator;

//////////////////////////////////////////////

/*class IVertex2
{
public:
	virtual ~IVertex2() {}
	virtual const Vector2 point() const = 0;
	virtual const Vector2 normal() const = 0;
};*/
class IVertexIterator2
{
public:
	virtual ~IVertexIterator2() {}
	//virtual const IVertex2& current() const = 0;
	virtual const Vector2 point() const = 0;
	virtual const Vector2 normal() const = 0;
	virtual bool next() = 0;
};

class IEdge2
{
public:
	virtual ~IEdge2() {}
	virtual const Vector2 startPoint() const = 0;
	virtual const Vector2 endPoint() const = 0;
	virtual const Vector2 startNormal() const = 0;
	virtual const Vector2 endNormal() const = 0;
	virtual IVertexIterator2* segmentate(Scalar tolerance, IStackAllocator& stack) const = 0;
};

class IEdgeIterator2
{
public:
	virtual ~IEdgeIterator2() {}
	virtual const IEdge2& current() const = 0;
	virtual bool next() = 0;
};


class ILinearEdge2 : public IEdge2
{
public:
	virtual const Vector2 normal() const = 0;
};

class ILinearEdgeIterator2 : public IEdgeIterator2
{
public:
	virtual const ILinearEdge2& current() const = 0;
};
